<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
use App\Middleware\Auth\FooMiddleware;

Router::get('/', [App\Controller\IndexController::class, 'index'], ['middleware' => [FooMiddleware::class]]);
Router::get('/login', [App\Controller\IndexController::class, 'loginView']);
Router::post('/login', [App\Controller\IndexController::class, 'login']);
Router::get('/encrypt', [App\Controller\IndexController::class, 'encrypt']);


Router::addServer('ws', function () {
    Router::get('/ws', 'App\Controller\WebSocketController');
});
